Skip to content

Remove Twig deprecations #519

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ZZromanZZ
Copy link

No description provided.

@ZZromanZZ ZZromanZZ force-pushed the remove-twig-deprecations branch 2 times, most recently from c0e0046 to 58d2ca8 Compare April 15, 2025 08:56
@gimler
Copy link
Contributor

gimler commented Apr 15, 2025

For this we must raise the twig min. version in composer.jsonto 3.12.0

@ZZromanZZ ZZromanZZ force-pushed the remove-twig-deprecations branch from 58d2ca8 to ba25a6e Compare April 15, 2025 11:17
@ZZromanZZ
Copy link
Author

Raised to Twig 3.12

@rvanlaak
Copy link
Member

3.12 was release in August 2024, not sure if that bump is considered to be too big?

https://github.com/twigphp/Twig/releases/tag/v3.12.0

@ZZromanZZ ZZromanZZ force-pushed the remove-twig-deprecations branch from ba25a6e to 7c7474e Compare April 15, 2025 19:30
@gimler
Copy link
Contributor

gimler commented Apr 16, 2025

I open a PR to only fix the AbstractNodeVisitor deprecations #520. I am not a fan of big prs with to many changes.

i also agree with @rvanlaak but we should only support twig releases for 1 year. What do you think @bocharsky-bw?

@ZZromanZZ ZZromanZZ force-pushed the remove-twig-deprecations branch from 7c7474e to 3bfdb5d Compare April 16, 2025 06:28
@ZZromanZZ
Copy link
Author

I moved AbstractNodeVisitor here to this bundle, deprecation about Twig's AbstractNodeVisitor beeing deprecated should be therefore resolved.

I also levereaged existence of this class to add metod to add functionality for getting the value from node, and here is specific method distinguished by Twig version - which should also remove deprecations and ensure older Twig version support

@gimler
Copy link
Contributor

gimler commented Apr 16, 2025

You can simply put your getValueFromNode() into a trait. With a comment that it can be removed when we raise the dependency of twig to 3.12.
We did not need the wrapper code doEnterNode doLeaveNode see my pr.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants